$.getUrlParam = function (name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]); return null;
};
if($.getUrlParam("id")!=null && $.getUrlParam("id")>0){
	var id = $.getUrlParam("id");
	$.ajax({
		type:"POST",
		url:"subpage/businessDetail",
		dataType:"json",
		data:{id:id},
		success:function(result){
			
			$("#nav_phone").html(result.phone);
			$("#breadcrumb").html(result.breadcrumb);
			$("#business_nav").html(result.business_nav);
			$("#subpage_content").html(result.content);
			$("#address").html(result.address);
			$("#b_phone").html(result.phone);
			$("#email").html(result.email);
		}
	});
}else{
	$.ajax({
		type:"POST",
		url:"subpage/businessList",
		dataType:"json",
		success:function(result){
			
			$("#nav_phone").html(result.phone);
			$("#breadcrumb").html(result.breadcrumb);
			$("#business_nav").html(result.business_nav);
			$("#subpage_content").html(result.content);
			$("#address").html(result.address);
			$("#b_phone").html(result.phone);
			$("#email").html(result.email);
		}
	});
}
